package com.scuola.scuoladocente;

import android.os.Bundle;
import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.widget.TabHost;

public class SelectionActivity extends TabActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_selection);
        
        Resources res = getResources();
        TabHost tabHost = getTabHost();
        
		Intent intent = new Intent(this, classeTab.class);
		intent.putExtra("idclasse", getIntent().getStringExtra("idclasse"));
		tabHost.addTab(tabHost.newTabSpec("Classe")
				.setIndicator("Classe", res.getDrawable(R.drawable.registrostudenti))
				.setContent(intent));

		Intent intent2 = new Intent(this, docenteTab.class);
		intent2.putExtra("idutente", getIntent().getStringExtra("idutente"));
		intent2.putExtra("idclasse", getIntent().getStringExtra("idclasse"));
		intent2.putExtra("nomeClasse", getIntent().getStringExtra("nomeClasse"));
		tabHost.addTab(tabHost
				.newTabSpec("Docente")
				.setIndicator("Docente", res.getDrawable(R.drawable.registro))
				.setContent(intent2));
		
		Intent intent3 = new Intent(this, avvisiTab.class);
		intent3.putExtra("idutente", getIntent().getStringExtra("idutente"));
		intent3.putExtra("idclasse", getIntent().getStringExtra("idclasse"));
		tabHost.addTab(tabHost
				.newTabSpec("Avvisi")
				.setIndicator("Avvisi", res.getDrawable(R.drawable.email_edit))
				.setContent(intent3));
		tabHost.setCurrentTab(0);

    }

}
